home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / MISC / DSP4TEST.ZIP / TST4.LST < prev    next >
Encoding:
File List  |  1994-04-02  |  2.3 KB  |  67 lines

  1. Motorola DSP56000 Assembler  Version 3.1  94-04-01  20:57:19  tst4.asm  Page 1
  2.  
  3.  
  4.  
  5. 1                        ; Generate constant quadrature (IQ) sinewave (1.81 kHz)
  6.  on left and right channels
  7. 2      
  8. 214    
  9. 215    
  10. 216       000020         buflen    equ     32
  11. 217       0001F4         f         equ     500
  12. 218       001F40         fs        equ     8000
  13. 219    
  14. 220       P:0040                   org     p:user_code
  15. 221    
  16. 222       P:0040 67F400            move              #buffer+2,r7
  17.                  000082
  18. 223       P:0042 057FA7            move              #buflen*4-1,m7
  19. 224    
  20. 225       P:0043 62F400            move              #buffer,r2
  21.                  000080
  22. 226       P:0045 3A0300            move              #4-1,n2
  23. 227       P:0046 057FA2            move              #buflen*4-1,m2
  24. 228    
  25. 229                                ctrlcd  1,r2,buflen,LINEI,0.0,0.0,LINEO|HEADP
  26. ,0.0,0.0
  27. 250       P:0052 205A00            move              (r2)+
  28. 251                                opencd  fs/1000
  29. 280    
  30. 281                      ; wait for one sample
  31. 282                      loop      waitblk r2,buflen,1
  32. 300    
  33. 301                      ; then generate the sinewave
  34. 302       P:0064 45F400            move              #0.3,x1
  35.                  266666
  36. 303    
  37. 304       P:0066 449800            move              x:<t1,x0
  38. 305       P:0067 4699A0            mpy     x0,x1,a   x:<t2,y0
  39. 306       P:0068 441954            sub     y0,a      x0,x:<t2
  40. 307       P:0069 561800            move              a,x:<t1
  41. 308    
  42. 309                      ; and output the generated samples
  43. 310       P:006A 4C5A00            move                          x0,y:(r2)+
  44. 311       P:006B 5E4A00            move                          a,y:(r2)+n2
  45. 312    
  46. 313       P:006C 0C0056            jmp     <loop
  47. 314    
  48. 315    
  49. 316       X:0018                   org     x:user_data
  50. 317    
  51. 318       X:0018         t1        dc      0.9
  52. 319       X:0019         t2        dc      0.0
  53. 320    
  54. 321       X:0080         buffer    dsm     buflen*4
  55. 322    
  56. 323    
  57. 324       Y:0018                   org     y:user_data
  58. 325    
  59. 326       Y:0080                   dsm     buflen*4
  60. 327    
  61. 328    
  62. 329                                end
  63.  
  64. 0    Errors
  65. 0    Warnings
  66.  
  67.